<?php

use Phinx\Migration\AbstractMigration;

class AddMoneyColumnInOrderTaskListTable extends AbstractMigration
{
    public function up()
    {
        $this->table("order_task_list")
            ->addColumn('money', 'char', ['default' => '', 'null' => false, 'limit' => 16, 'comment' => '任务单价'])
            ->addColumn("cost_man_hour", "char", ['default' => '', 'null' => false, 'limit' => 24, 'comment' => '成本工时'])
            ->addColumn("entity_id", "integer", ['default' => 0, 'null' => false, 'limit' => 24, 'comment' => '实体id'])
            ->save();
    }

    public function down()
    {
        $this->table("order_task_list")
            ->removeColumn("money")
            ->removeColumn("cost_man_hour")
            ->removeColumn("entity_id")
            ->save();
    }
}
